package com.zlf.blog.controller;

import com.zlf.blog.service.LoginService;
import com.zlf.blog.vo.Result;
import com.zlf.blog.vo.params.LoginParam;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author zlfi1
 */
@CrossOrigin
@RestController
@RequestMapping("login")
@Api(tags="登录")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping
    public Result login(@RequestBody LoginParam loginParam) {

        return loginService.login(loginParam);
    }
}